package com.hyj.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hyj.entity.Fenye;
import com.hyj.entity.Userchecks;
import com.hyj.service.UserchecksService;

@Controller
public class UserCheckController {
	@Autowired
	private UserchecksService userchecksService;
	@Autowired
	private Fenye<Userchecks> fenye;

	// 分页查询所有员工的信息
	@RequestMapping(value = "getUsercheckAll", method = RequestMethod.POST)
	@ResponseBody
	public Fenye<Userchecks> getUserChecks(Integer page, Integer rows,
			Userchecks userchecks) {
		fenye.setPage((page - 1) * rows);
		fenye.setPageSize(rows);
		fenye.setUserchecks(userchecks);
		return userchecksService.selectCheckUser(fenye);
	}
	//经理强制签出
	@RequestMapping(value = "updateUserCheckQC", method = RequestMethod.POST)
	@ResponseBody
	public Integer updateUserCheckQC(Userchecks userchecks) {
		return userchecksService.updateUserCheckQC(userchecks);

	}
	      //批量签退
			@RequestMapping(value="/upsignon",method=RequestMethod.POST)
			@ResponseBody
			public Integer upsignon(String userId){
				return userchecksService.upsignon(userId);
			}
}
